home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir39 / escv20.zip / ESC.DOC next >
Text File  |  1993-03-28  |  11KB  |  237 lines

  1. ESC
  2.  
  3. Written by 
  4. Craig Brauckmiller
  5.  
  6. March 28, 1993
  7.  
  8.  
  9. Legal Stuff
  10. =============================================================================
  11. This program is shipped as is.  I do not make any guarantees to the file's
  12. integrity at the time of execution.  I will not be liable to any damage
  13. caused by this program (like this program will do that).  Below is some
  14. information about the file ESC.EXE
  15.  
  16. This program is shareware.  If you like it, feel free to make a donation
  17. of $10.  The address info is at the end of this file.
  18.  
  19. If you have a copy of McAfee's Validate program, run it on ESC.EXE.  Below
  20. are the values that the file had at the time it was zipped.  If they
  21. are different, then the file may be damaged or may have been tampered with.
  22. If the values are different then these listed, delete the files and 
  23. re-download it.  It would also be a good idea to run McAfee's SCAN program
  24. on it to check for viruses.
  25.  
  26.           File Name:  ESC.EXE
  27.                Size:  16,064
  28.                Date:  3-28-1993
  29. File Authentication:
  30.      Check Method 1 - 3B29
  31.      Check Method 2 - 0158
  32.  
  33.  
  34.  
  35. OVERVIEW
  36. =============================================================================
  37. This program was written for the sole purpose of sending printer
  38. ESCape codes from the DOS prompt.  This makes it ideal for use  
  39. in DOS batch files to set certain attributes on the printer.
  40.  
  41. The program will work on dot matrix and laser printers.  For a detailed
  42. list of control codes, consult your printer user's manual first.  
  43.  
  44. For instance, if you have an older package that does not have a printer
  45. selection, you can create a batch file that sends the commands to the   
  46. printer before the application is executed.
  47.  
  48. How it works.  
  49.  
  50. At a DOS prompt, type ESC followed by the escape sequence of your choice.      
  51. This program is not designed to check your escape codes for validity, it
  52. is only a tool to pass your information on to the printer.  
  53. A very important note, most escape codes are case sensitive.  This means that
  54. if the code requires a lower case "e" then you must type a lower case "e".
  55. This program was designed to run on LPT1, LPT2 and LPT3 only.  It will also
  56. work if you have your printer attached serially and have DOS redirect the
  57. LPT port to the COM port that your printer is attached to.
  58.  
  59.  
  60. SWITCHES
  61. =============================================================================
  62. This program has several optional switches to make life a little easier.
  63. When switches are used, a space must precede and follow the switch to
  64. separate it from the rest of the escape sequence.  You may use up to 9
  65. command line switches.
  66.                                             
  67.    /H or /?  -  These switches are used to bring up the on-line help
  68.                 This switch will terminate the program immediately.                
  69.                 Any switch following it will not be recognized or 
  70.                 executed.
  71.  
  72.                 ESC /H
  73.                 ESC /?
  74.                 ESC
  75.  
  76.    /EXAMPLE  -  This switch will display a screen of examples.
  77.                 This switch will terminate the program immediately.
  78.                 Any switch following it will not be recognized or
  79.                 executed.
  80.  
  81.                 ESC /EXAMPLE
  82.                 
  83.    /REGISTER -  This switch will display a registeration screen.
  84.                 This switch will terminate the program immediately.
  85.                 Any switch following it will not be recognized or
  86.                 executed.
  87.  
  88.                 ESC /REGISTER
  89.  
  90.    \         -  This switch tells the program that a decimal value is
  91.                 to follow.  You would use this when an escape sequence
  92.                 requires a decimal value.  An example would be 
  93.                 the ESC k command for the Epson Dot Matrix printers.
  94.                 This is the command to choose the different type faces
  95.                 available on the printer.  
  96.  
  97.                 ESC k \4 
  98.  
  99.                 This command would select the script font on 24 pin
  100.                 printers.
  101.  
  102.                 If a non-numeric character is sent after the \, the program
  103.                 will simply ignore the code.  However, if the \ is used in
  104.                 conjunction with the /PRINTxx switch, the value after the
  105.                 \ will be treated as a file name.
  106.  
  107.                 ESC /PRINT \AUTOEXEC.BAT - This will print the AUTOEXEC.BAT
  108.                                            file located in the root directory.
  109.  
  110.    /S        -  This switch is used to suppress the sending of the 
  111.                 escape character.  In the Epson Dot Matrix Language,
  112.                 there are a few codes that do not work when they are
  113.                 preceded with the escape character.  An example is
  114.                 the Cancel Condense command (Decimal 18).  To send this
  115.                 command, type the following:
  116.  
  117.                 ESC /S \18
  118.  
  119.                 NOTE: This command will suppress the sending of the ESC code 
  120.                       for the entire line.  If you need to send an ESC code, 
  121.                       you would have to use \27 in front of whatever you
  122.                       wanted to send.
  123.  
  124.    /PSxx     -  This switch will allow you to print the current screen. 
  125.                 The program uses DOS interrupt 5h to invoke the print 
  126.                 screen function.  The variable xx refers to the number of
  127.                 seconds for ESC to wait before processing the next command
  128.                 line switch.  This is especially handy for slower dot matrix
  129.                 printers.  If you try to send another code immediately following
  130.                 this switch, the printer will be busy printing the scren and
  131.                 the program will terminate operation with a PRINTER BUSY error.
  132.                 A value of 10 for xx is usually sufficient for even the slowest
  133.                 dot matrix printers.  You really wouldn't need to use the xx
  134.                 variable on laser printers.  This command will only work on
  135.                 LPT1.  There is no easy way to redirect a print screen to 
  136.                 any other LPT port.
  137.  
  138.                 ESC /PS /FF   - Print screen and issue form feed immediately.
  139.                 ESC /PS10 /FF - Print screen, wait 10 seconds and then issue
  140.                                 the form feed.
  141.  
  142.    /FFxx     -  This switch will cause the printer to form feed to the
  143.                 next top of form.  This command is an excellent tool
  144.                 for testing the Short Tear Off functions available on
  145.                 Epson Dot Matrix printers.  The variable xx refers to the
  146.                 parallel port that you wish to send the form feed to.  If
  147.                 no number is used, the program will default to LPT1.
  148.  
  149.                 ESC /FF  - Issue form feed to LPT1.
  150.                 ESC /FF3 - Issue form feed to LPT3.
  151.  
  152.    /HWxx     -  This switch will send a hardware reset code to the printer.
  153.                 The printer will act as if it were just powered on.  This
  154.                 switch is extremely helpful if your printer appears to
  155.                 lock up.  The program uses DOS interrupt 17h, function 1h
  156.                 to invoke the reset function.  The variable xx designates
  157.                 the parallel port to send the reset code.  If no number is
  158.                 given, the program defaults to LPT1.  The program will 
  159.                 wait 3 seconds before it will process the next switch.
  160.                 This will give your dot matrix printer a chance to home
  161.                 itself.
  162.  
  163.                 ESC /HW  - Send hardware reset to LPT1
  164.                 ESC /HW2 - Send hardware reset to LPT2
  165.  
  166.    /STxx     -  This switch will display the current status of the parallel port.
  167.                 The program will return on of the following status conditions.
  168.                 The variable xx refers to the parallel port from which the program
  169.                 is to return the status.  If no value is specified, the program
  170.                 will default to LPT1.
  171.           
  172.                 ESC /ST    - Get port status for LPT1
  173.                 ESC /ST3   - Get port status for LPT3
  174.  
  175.                 Printer is READY
  176.                 Printer is BUSY
  177.                 Printer is OUT OF PAPER
  178.                 Printer is OFF LINE or is TURNED OFF
  179.                 Printer has an UNKNOWN ERROR
  180.  
  181.    /PRINTxx fname.txt -  Used to print any ASCII text files to the printer.  
  182.                          fname.txt is the file that you wish to print.
  183.                          xx is the port number.  If no value for xx is entered
  184.                          the program will default to LPT1.
  185.  
  186.                          IMPORTANT NOTE:  The file name MUST follow the 
  187.                          /PRINT command immediately.  The program looks at
  188.                          the next command line entry for the file name.  If
  189.                          you do not enter a file name, the program will use
  190.                          the next command line switch as the file name and
  191.                          probably terminate with the error: `` was not found.
  192.                            
  193.                          ESC /PRINT ESC.PAS -  Print the file ESC.PAS to LPT1.
  194.                          ESC /PRINT3 ESC.PAS - Print the file ESC.PAS to LPT3. 
  195.                 
  196.    /LPTxx    -  Specify the parallel port to send the ESC sequene.      
  197.                 NOTE: This command only applies to the actual ESC sequence.
  198.                       This switch does not apply to any other command switch.
  199.                 xx is the port number.  If no value is entered for xx, the
  200.                 program defaults to LPT1.
  201.  
  202.                 ESC /LPT2 @             - Send ESC @ to the printer on LPT2.
  203.                 ESC /LPT3 @ /FF3        - Send ESC @ to the printer on LPT3 and
  204.                                           issue a form feed to the printer on
  205.                                           LPT3.
  206.  
  207.  
  208. The command line switches are not case sensitive, they may be entered in
  209. either upper case or lower case.  You may combin any combination of switches
  210. unless otherwise specified.
  211.  
  212.  
  213. BATCH FILES
  214. =============================================================================
  215. If you decide to run this program from a DOS batch file, the program will
  216. terminate with either error level 0 for a normal program execution or
  217. an error level 1 for abnormal program termination.  This version of the
  218. program will only exit with an error level 1 if the printer is not ready
  219. or some type of printer error occurred.
  220.  
  221. It would be a good idea to place this program in your DOS directory or
  222. a sub-directory that is in the PATH.  It will make program execution
  223. a lot easier.
  224.  
  225. If you find this program useful, please send a donation of $10 to:
  226.  
  227. Craig Brauckmiller
  228. 911 W. Lincoln #320
  229. Montebello, CA  90640  USA
  230.  
  231. I may also be reached on CompuServe at the following ID #.
  232.  
  233. CompuServe ID : 73627,1377
  234.  
  235. If you have any functions that you would like to see added to the program,
  236. feel free to drop me a note and I'll see what I can do.
  237.